;;for auto create file header
(require 'header2)
(setq header-copyright-notice " Copyright (C) 2006 ada
       Addr:Chengdu china   
       Tel :+86 028-66885359
")
(setq make-header-hook '(
			 header-mode-line
			 header-file-name
                         header-blank
			 header-keywords
			 header-blank
			 header-copyright
			 header-author
                         header-creation-date
			 header-modification-date
			 header-end-line
                         header-history
                         header-blank
			 header-blank
			 header-blank
			 header-end-line
			 header-code
			 header-eof
			 ))
(add-hook 'write-file-hooks 'update-file-header)
(add-hook 'emacs-lisp-mode-hooks 'auto-make-header)
(add-hook 'c-mode-common-hook 'auto-make-header)

;;;
(defun create-tags (dir-name)
   "Create tags file."
   (interactive "DDirectory: ")
   (eshell-command
   (format "find %s -type f -name '*.[ch]' | etags -" dir-name)))

;;;xref

(setq exec-path (cons "/usr/local/share/emacs/22.0.50/site-lisp/xref" exec-path))
(setq load-path (cons "/usr/local/share/emacs/22.0.50/site-lisp/xref/emacs" load-path))
(load "xrefactory")

